#ifndef  _AT24C02_
#define _AT24C02_

#include "main.h"

#define  x24c02                                    //选择芯片类型
#define DEV_ADDR_W				0xA0					  //设备硬件地址  a0 a1 a2
#define DEV_ADDR_R				  0xA1					//设备硬件地址  a0 a1 a2
#ifdef x24c02

#define  PAGE_NUM                                                32        //页数
#define  PAGE_SIZE                                               8         //单页容量大小
#define  CAPACITY_SIZE		(PAGE_NUM * PAGE_SIZE)	    //总容量(字节)
#define  ADDR_BYTE_NUM		I2C_MEMADD_SIZE_8BIT    //地址所占字节长度

#endif


void AT24C02_INIT(void);
void AT24C02_save_data(void);//保存数据到AT24C02
void AT24C02_load_data(void);//
#endif

